<% var pageLevelJS = { %>
<%include("/WEB-INF/views/btl/template/include/select2.html"){}%>
<script type="text/javascript">
var settings = {
		 modelDomainFlag:"sys"
		 ,modelName:"邮箱"
		 ,modelFlag:"emailbox"
		 ,key:"${sessionId}" 
		}
</script> 
<script type="text/javascript" src="${ctx}/static/js/sys/emailbox/edit.js"></script>
<%};%> 
<% var layoutParas =
{"title":"","add":isEmpty(data.id),"formId":"applyeditForm","pageLevelJS":pageLevelJS};
layout("/WEB-INF/views/btl/template/backBasicEditFormTemplate.html", layoutParas){ %>
	  <input type="hidden" name="id" value="${data.id}">
		<input type="hidden" valid="true" name="password">
      <div class="form-group  col-md-5">
	       <label for="name" class="required-before col-sm-3 control-label no-padding-right">名称:</label>
	       <div class="col-sm-9 inline-height ">
	      			 <div class="parentCls" style="display: inline;">
				        <input type="text" w="100%" oldval="${data.name}" value="${data.name}" class="validate[required,custom[email],maxSize[50]] inputElem col-xs-10" name="name" placeholder="邮箱">
				     </div>
	 	    </div> 
	   </div>
	    <%if(isEmpty(data.id)){%>
      <div class="form-group  col-md-5">
	       <label for="name" class="required-before col-sm-3 control-label no-padding-right">密码:</label>
	       <div class="col-sm-9 inline-height ">
			<input type="password" oldval="" targetname="password"  placeholder="密码" class="col-xs-10 validate[required,maxSize[50]] password" />
		  </div> 
	   </div>
   <%}else{%>
      <div class="form-group  col-md-5">
	       <label for="name" class="col-sm-3 control-label no-padding-right">密码:</label>
	       <div class="col-sm-9 inline-height ">
			<input type="password" oldval="" targetname="password"  placeholder="密码" class="col-xs-10 validate[maxSize[50]] password" />
		  </div> 
	   </div>
   <%}%>
   <div class="form-group col-md-5">
	     <label class="required-before col-sm-3 control-label no-padding-right" for="addressId">邮件服务地址:</label>
		 <div class="col-sm-9 inline-height ">
		   <select placeholder="邮件服务地址" name="addressId" oldval="${data.addressId}" class="col-xs-10">
				<% for(res in addressFlags!){ %>
				  <option value="${res.id}"
				   <%if(data.addressId==res.id){%>
					  selected="selected"
					 <%}%>
				  >${res.name}</option>
			　　   <% } %>
			</select>
	  	 </div>
	  </div>
	  <div class="form-group col-md-5">
	     <label for="remark" class="col-sm-3 control-label no-padding-right">备注:</label>
	     <div class="col-sm-9 inline-height">
		    <input type="text"  oldval="${data.remark}" value="${data.remark}" class="validate[maxSize[50]] col-xs-10" name="remark" placeholder="备注">
		  </div>
	  </div>	 	 
<%} %>
